package com.testdocs.client.version.list;

import com.google.gwt.user.client.ui.IsWidget;
import com.testdocs.client.validation.ConstraintViolationException;
import com.testdocs.client.version.VersionInfo;

public interface VersionListView extends IsWidget {
	public void setVersionsList(VersionInfo[] versions);
	
	public void setPresenter(Presenter presenter);
	
	public interface Presenter {
		public void saveNewVersion(VersionInfo newVersion, String basedOnVersionId) throws ConstraintViolationException;
		public void rename(VersionInfo version) throws ConstraintViolationException;
		public void remove(VersionInfo versions[]);
	}

	void setSavedVersion(VersionInfo versionInfoToReplace, VersionInfo savedVersionInfo);
}
